/**
 * 
 * @Project HRL Simulation
 * @Date 20.06.2011
 * @Author Aebi Pascal, Kocher Marc, Sriranjan George
 * @School BFH-TI Biel, Projekt 1
 *
 */

package elements;

import utils.Position;
import utils.Resource;

public class Buffer extends Resource{
	
	private Type type;
	
	
	/**
	 * The type of a buffer represents the direction of the load.
	 * <ul>
	 * <li><b>IN</b>, from conveyor via buffer to any rack position
	 * <li><b>OUT</b>, from any rack position via buffer to the conveyor
	 * </ul>
	 */
	public enum Type{IN, OUT;};
	
	
	/**
	 * creates a buffer with corresponding position in the world3d and type
	 * @param position (x,y,z) coordinates 
	 * @param type enumeration Type (IN or OUT)
	 */
	public Buffer(Position position, Type type){
		super(position);
		new Resource(position);
		this.type = type;
	}
	
	
	/**
	 * get the type of a buffer
	 * @return IN or OUT
	 */
	public Type getType(){
		return this.type;
	}

	
	@Override
	public String toString(){
		return "buffer: "+this.getPosition()+"  type: "+this.type;
	}
	
}
